unit ULogin;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, BllLogin, DatLogin,
  Vcl.ExtCtrls;

type
  TfrmLogin = class(TForm)
    Panel1: TPanel;
    btnEntrar: TButton;
    edtUsuario: TEdit;
    edtSenha: TEdit;
    imgLogo: TImage;
    procedure btnEntrarClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmLogin: TfrmLogin;
  loginBll:TBllLogin;
  loginDat:TDatLogin;

implementation

{$R *.dfm}

procedure TfrmLogin.btnEntrarClick(Sender: TObject);
var
  resposta:Boolean;
begin
 loginDat.usuario := edtUsuario.Text;
 loginDat.senha := edtSenha.Text;
 resposta := loginBll.logar(loginDat);
 if(resposta)then
    ShowMessage('Ok')
 else
    ShowMessage('Error');
end;

procedure TfrmLogin.FormCreate(Sender: TObject);
begin
  loginBll := TBllLogin.Create;
  loginDat := TDatLogin.Create;
end;

end.
